<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<audio  id="sound"  controls="controls" autoplay="autoplay"
       webkit-playsinline="true"    playsinline="true"   heigth="100%"></audio >
</body>

<script src="jquery-2.1.0.js" type="text/javascript" charset="utf-8"></script>
<script src="ajaxfileupload.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
//创建XMLHttpRequest对象
var xhr = new XMLHttpRequest();
//配置请求方式、请求地址以及是否同步
xhr.open('POST', '/CreatedTest/getMusicSrc', true);
//设置请求结果类型为blob
xhr.responseType = 'blob';
//请求成功回调函数
xhr.onload = function(e) {
    if (this.status == 200) {//请求成功
        //获取blob对象
        var blob = this.response;
        //获取blob对象地址，并把值赋给容器
        $("#sound").attr("src", URL.createObjectURL(blob));
    }
};
xhr.send();
</script>
</html>